package com.yan.jdbcdemo;

import com.yan.utils.BaseDAO;
import org.junit.jupiter.api.Test;

/**
 * @author taoge
 * @Date 2024/8/23 14:24
 * @Description
 */
public class JDBCDemo3 {

    @Test
    public void test1() {
        int count = BaseDAO.insertOneRow("insert into stu value(null ,?,?,?,?,?)", "张三", 22, 50.0, "武汉", 3);
        System.out.println("count = " + count);
    }

    @Test
    public void test2(){
        int count = BaseDAO.deleteOneRow("delete from stu where id = ?", 6);
        System.out.println("count = " + count);
    }

    @Test
    public void test3()  {
        int count = BaseDAO.deleteMutiplyRow("delete from stu where id = ?", 1, 3, 5);
        System.out.println("count = " + count);
    }
}
